<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Strict//EN">
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>simRotateAroundAxis</title>
<link rel="stylesheet" type="text/css" href="../../style.css">
</head>

<body>

<div align="center">
<table class=allEncompassingTable >
 <tr>
  <td >
<p><a href="../../index.html" TARGET="_top"><img src="../images/homeImg.png"></a></p>

<h1><a href="../apiOverview.htm">Regular API</a> function</h1>
<h3 class=subsectionBar><a name="simRotateAroundAxis" id="simRotateAroundAxis"></a>simRotateAroundAxis / sim.rotateAroundAxis </h3>
<table class=apiTable>
<tr class=apiTableTr> 
<td class=apiTableLeftDescr>
Description 
</td> 
<td class=apiTableRightDescr>Rotates a transformation matrix around a random axis in space. This function, when used in combination with <a href="simGetRotationAxis.htm">sim.getRotationAxis</a>, can be used to build interpolations between transformation matrices. See also <a href="simGetObjectMatrix.htm">sim.getObjectMatrix</a>, <a href="simSetObjectMatrix.htm">sim.setObjectMatrix</a> and the other <a href="../apiFunctionListCategory.htm#coordinatesAndTransformations">matrix/transformation functions</a>.</td>
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCSyn>
C synopsis
</td> 
<td class=apiTableRightCSyn>simInt simRotateAroundAxis(const simFloat* matrixIn,const simFloat* axis,const simFloat* axisPos,simFloat angle,simFloat* matrixOut)  <br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCParam>C parameters</td> 
<td class=apiTableRightCParam>
<div><strong>matrixIn</strong>: the transformation matrix to rotate</div>
<div><strong>axis</strong>: the axis vector in absolute coordinates to rotate around</div>
<div><strong>axisPos</strong>: the position of the rotation axis in absolute coordinates</div>
<div><strong>angle</strong>: the amount of rotation to perform</div>
<div><strong>matrixOut</strong>: the returned transformed (rotated) matrix</div>
<div></div></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftCRet>
C return value
</td> 
<td class=apiTableRightCRet>
<div>-1 if operation was not successful<br>
</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLSyn>
Lua synopsis
</td> 
<td class=apiTableRightLSyn>table_12 matrixOut=sim.rotateAroundAxis(table_12 matrixIn,table_3 axis,table_3 axisPos,number angle)<br></td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLParam>Lua parameters</td> 
<td class=apiTableRightLParam>
<div>Similar to the C-function counterpart</div>
</td> 
</tr> 
<tr class=apiTableTr> 
<td class=apiTableLeftLRet>
Lua return values
</td> 
<td class=apiTableRightLRet>
<div><strong>matrixOut</strong>: the transformed (rotated) matrix, or nil in case of an error</div>
</td> 
</tr> 
</table> 

<br>
<p><a href="../apiFunctions.htm">All regular API functions on one page</a></p>
<br>
<br>
</td>
</tr>
</table>
</div>
</body>
</html>
